<template>
    <div>
        <div class="personal">
            <div class="header">
                <Icon class="back" type="md-arrow-back" :size="25" title="返回" @click="back" />
                <img src="../assets/images/timg4.jpg"/>
                <div class="zan">
                    <Icon type="md-thumbs-up" :size="20" title="赞"/>
                    <p>1122</p>
                </div>
            </div>
            <div class="content">
                <p class="fullname">下雪</p>
                <p class="talk">嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻嘻</p>
                <div class="config">
                    <Icon type="md-person" />
                    <p>下雪（1002）</p> 
                </div>
                <div class="config">
                    <Icon type="md-pin" />
                    <p>郑州（男 20岁）</p> 
                </div>
                <div class="config">
                    <Icon type="md-call" />
                    <p>15523456781</p> 
                </div>
                <Button class="button" type="primary" @click="add()">添加好友</Button>
                <!-- <Button class="button" :size="buttonSize" type="primary" @click="button">编辑资料</Button> -->
            </div>
        </div>
    </div>
</template>

<script>
  export default {
    data () {
      return {}
    },
    methods: {
      // 返回
      back () {
        this.$router.push({path: '/home'})
      },
      // 编辑资料
      button () {
        this.$router.push({path: '/personal-edit'})
      },
      // 添加好友
      add () {
        this.$router.push({path: '/add'})
      }
    }
  }
</script>

<style lang="less" scoped>
.personal{
    width: 320px;
    height: 540px;
    background-color: #fff;
    position: relative;
    border-radius: 4px;
    .header{
        position: relative;
        width: 100%;
        height: 160px;
        color: #fff;
        background-image: url('../assets/images/timg7.png');
        background-repeat:no-repeat;
        background-size:320px 160px;
        .back{
            float: left;
            margin-left: 10px;
            line-height: 40px;
        }
        img{
            position: absolute;
            left: 120px;
            bottom: -40px;
            width: 80px;
            height: 80px;
            border-radius: 50%;
        }
        .zan{
            position: absolute;
            right: 0;
            bottom: 0;
            width: 40px;
            height: 40px;
            background-color: rgba(0, 0, 0, 0.5);
            text-align: center; 
        }
    }
    .content{
        height: 340px;
        margin-top: 40px;
        .fullname{
            color: #333;
            font-size: 20px;
            font-weight: 700;
            text-align: center;
            line-height: 40px;
        }
        .talk{
            color: #777;
            font-size: 12px;
            text-align: center;
            margin-bottom: 20px;
        }
        .config{
            width: 100%;
            height: 40px;
            color: #444;
            .ivu-icon{
                font-size: 16px;
                margin-left: 40px;
                margin-top: -6px;
            }
            p{
                display: inline;
                font-size: 16px;
                line-height: 40px;
                margin-left: 10px;
            }
        }
        .button{
            width: 120px;
            margin-left: 100px;
            margin-top: 80px;
        }
    }
}
  
</style>


